USE $(database)
GO

/****** Object:  Table [dbo].[account_characters]    Script Date: 12/08/2011 00:03:12 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[account_characters](
	[id] [bigint] IDENTITY(1,1) NOT NULL,
	[characterID] [bigint] NOT NULL,
	[name] [varchar](50) NOT NULL,
	[accountId] [bigint] NOT NULL,
	[corporationID] [bigint] NULL,
	[corporationName] [varchar](250) NULL,
 CONSTRAINT [PK_account_characters] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[account_characters]  WITH CHECK ADD  CONSTRAINT [FK_account_characters_user_accounts] FOREIGN KEY([accountId])
REFERENCES [dbo].[user_accounts] ([id])
GO

ALTER TABLE [dbo].[account_characters] CHECK CONSTRAINT [FK_account_characters_user_accounts]
GO



